home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14488 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: lrz-muenchen.de!news
  2. From: watzka@stat.uni-muenchen.de (Kurt Watzka)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Obtaining file lists in C?
  5. Date: 15 Apr 1996 09:09:05 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4kt3nh$n1k@sparcserver.lrz-muenchen.de>
  9. References: <gcraig.1.001653A2@interaccess.com>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11. Keywords: files, lists, listings, directory
  12.  
  13. gcraig@interaccess.com (George Craig) writes:
  14.  
  15. >Could someone please tell me just one of the many ways I could implement an 
  16. >efficient file listing technique in standard ANSI or k&R c?
  17.  
  18. You do not need just any method, but it must be an "efficient" method?
  19. If you have an inefficient method that works with your system, why
  20. don't you post it so that you can get some hints on what might be
  21. inefficient about it?
  22.  
  23. To get a list of all files in a directory in standard ANSI C, you will
  24. have to ask the user to type it in. C is not aware of file systems,
  25. so all answers will be system specific. For answers for some systems 
  26. see the question "How can I read a directory in a C program?" in the
  27. FAQ. If you need a more efficient method, feel free to implement one. 
  28.  
  29. Kurt
  30. --
  31. | Kurt Watzka                             Phone : +49-89-2180-6254
  32. | watzka@stat.uni-muenchen.de
  33.